package request

import (
	"gitee.com/cjsn/topsdk/util"
)

type TmallServicecenterWorkcardLogisticsorderUpdateRequest struct {
	/*
	   体积 单位 立方毫米     */
	Volume *int64 `json:"volume,omitempty" required:"false" `
	/*
	   重量 单位 克     */
	Weight *int64 `json:"weight,omitempty" required:"false" `
	/*
	   备注说明     */
	Comment *string `json:"comment,omitempty" required:"false" `
	/*
	   物流单号（展示给消费者）     */
	ExpressCode *string `json:"express_code,omitempty" required:"false" `
	/*
	   物流公司名词（展示给消费者）     */
	ExpressCompany *string `json:"express_company,omitempty" required:"false" `
	/*
	   小件员手机号码     */
	CourierMobile *string `json:"courier_mobile,omitempty" required:"false" `
	/*
	   小件员姓名     */
	CourierName *string `json:"courier_name,omitempty" required:"false" `
	/*
	   取件码     */
	GotCode *string `json:"got_code,omitempty" required:"false" `
	/*
	   物流订单号     */
	LogisticsOrderId *int64 `json:"logistics_order_id" required:"true" `
	/*
	   金额 单位分     */
	Cost *int64 `json:"cost,omitempty" required:"false" `
	/*
	   1、以下状态时必填： 包裹已揽收完成 2、字符串格式为：json 串 例子： [{ "name": "上衣", "count": 1 }, { "name": "裤子", "count": 2 }]     */
	GoodsInfo *string `json:"goods_info,omitempty" required:"false" `
	/*
	   物流创建 ：create 物流取消 ：cancel 分派小件员：assign 已经分派小件员: assigned 包裹上门揽收: pickup_door 包裹已揽收完成: pickup_finished 包裹派送中: dispatching 包裹已签收: signed     */
	StatusCode *string `json:"status_code" required:"true" `
	/*
	   物流子单号     */
	SubExpressCodes *[]string `json:"sub_express_codes,omitempty" required:"false" `
	/*
	   预计送达时间  dispatching节点时必填     */
	DeliveryTime *util.LocalTime `json:"delivery_time,omitempty" required:"false" `
	/*
	   签收时间 signed节点时必填     */
	SignTime *util.LocalTime `json:"sign_time,omitempty" required:"false" `
	/*
	   揽收完成时间 pickup_finished节点时必填     */
	PickupFinishTime *util.LocalTime `json:"pickup_finish_time,omitempty" required:"false" `
	/*
	   上门揽收时间 pickup_door节点时必填     */
	PickupDoorTime *util.LocalTime `json:"pickup_door_time,omitempty" required:"false" `
	/*
	   是否更新新物流数据     */
	NewLogistics *bool `json:"new_logistics,omitempty" required:"false" `
	/*
	   扩展属性     */
	ExtendInfo *string `json:"extend_info,omitempty" required:"false" `
}

func (s *TmallServicecenterWorkcardLogisticsorderUpdateRequest) SetVolume(v int64) *TmallServicecenterWorkcardLogisticsorderUpdateRequest {
	s.Volume = &v
	return s
}
func (s *TmallServicecenterWorkcardLogisticsorderUpdateRequest) SetWeight(v int64) *TmallServicecenterWorkcardLogisticsorderUpdateRequest {
	s.Weight = &v
	return s
}
func (s *TmallServicecenterWorkcardLogisticsorderUpdateRequest) SetComment(v string) *TmallServicecenterWorkcardLogisticsorderUpdateRequest {
	s.Comment = &v
	return s
}
func (s *TmallServicecenterWorkcardLogisticsorderUpdateRequest) SetExpressCode(v string) *TmallServicecenterWorkcardLogisticsorderUpdateRequest {
	s.ExpressCode = &v
	return s
}
func (s *TmallServicecenterWorkcardLogisticsorderUpdateRequest) SetExpressCompany(v string) *TmallServicecenterWorkcardLogisticsorderUpdateRequest {
	s.ExpressCompany = &v
	return s
}
func (s *TmallServicecenterWorkcardLogisticsorderUpdateRequest) SetCourierMobile(v string) *TmallServicecenterWorkcardLogisticsorderUpdateRequest {
	s.CourierMobile = &v
	return s
}
func (s *TmallServicecenterWorkcardLogisticsorderUpdateRequest) SetCourierName(v string) *TmallServicecenterWorkcardLogisticsorderUpdateRequest {
	s.CourierName = &v
	return s
}
func (s *TmallServicecenterWorkcardLogisticsorderUpdateRequest) SetGotCode(v string) *TmallServicecenterWorkcardLogisticsorderUpdateRequest {
	s.GotCode = &v
	return s
}
func (s *TmallServicecenterWorkcardLogisticsorderUpdateRequest) SetLogisticsOrderId(v int64) *TmallServicecenterWorkcardLogisticsorderUpdateRequest {
	s.LogisticsOrderId = &v
	return s
}
func (s *TmallServicecenterWorkcardLogisticsorderUpdateRequest) SetCost(v int64) *TmallServicecenterWorkcardLogisticsorderUpdateRequest {
	s.Cost = &v
	return s
}
func (s *TmallServicecenterWorkcardLogisticsorderUpdateRequest) SetGoodsInfo(v string) *TmallServicecenterWorkcardLogisticsorderUpdateRequest {
	s.GoodsInfo = &v
	return s
}
func (s *TmallServicecenterWorkcardLogisticsorderUpdateRequest) SetStatusCode(v string) *TmallServicecenterWorkcardLogisticsorderUpdateRequest {
	s.StatusCode = &v
	return s
}
func (s *TmallServicecenterWorkcardLogisticsorderUpdateRequest) SetSubExpressCodes(v []string) *TmallServicecenterWorkcardLogisticsorderUpdateRequest {
	s.SubExpressCodes = &v
	return s
}
func (s *TmallServicecenterWorkcardLogisticsorderUpdateRequest) SetDeliveryTime(v util.LocalTime) *TmallServicecenterWorkcardLogisticsorderUpdateRequest {
	s.DeliveryTime = &v
	return s
}
func (s *TmallServicecenterWorkcardLogisticsorderUpdateRequest) SetSignTime(v util.LocalTime) *TmallServicecenterWorkcardLogisticsorderUpdateRequest {
	s.SignTime = &v
	return s
}
func (s *TmallServicecenterWorkcardLogisticsorderUpdateRequest) SetPickupFinishTime(v util.LocalTime) *TmallServicecenterWorkcardLogisticsorderUpdateRequest {
	s.PickupFinishTime = &v
	return s
}
func (s *TmallServicecenterWorkcardLogisticsorderUpdateRequest) SetPickupDoorTime(v util.LocalTime) *TmallServicecenterWorkcardLogisticsorderUpdateRequest {
	s.PickupDoorTime = &v
	return s
}
func (s *TmallServicecenterWorkcardLogisticsorderUpdateRequest) SetNewLogistics(v bool) *TmallServicecenterWorkcardLogisticsorderUpdateRequest {
	s.NewLogistics = &v
	return s
}
func (s *TmallServicecenterWorkcardLogisticsorderUpdateRequest) SetExtendInfo(v string) *TmallServicecenterWorkcardLogisticsorderUpdateRequest {
	s.ExtendInfo = &v
	return s
}

func (req *TmallServicecenterWorkcardLogisticsorderUpdateRequest) ToMap() map[string]interface{} {
	paramMap := make(map[string]interface{})
	if req.Volume != nil {
		paramMap["volume"] = *req.Volume
	}
	if req.Weight != nil {
		paramMap["weight"] = *req.Weight
	}
	if req.Comment != nil {
		paramMap["comment"] = *req.Comment
	}
	if req.ExpressCode != nil {
		paramMap["express_code"] = *req.ExpressCode
	}
	if req.ExpressCompany != nil {
		paramMap["express_company"] = *req.ExpressCompany
	}
	if req.CourierMobile != nil {
		paramMap["courier_mobile"] = *req.CourierMobile
	}
	if req.CourierName != nil {
		paramMap["courier_name"] = *req.CourierName
	}
	if req.GotCode != nil {
		paramMap["got_code"] = *req.GotCode
	}
	if req.LogisticsOrderId != nil {
		paramMap["logistics_order_id"] = *req.LogisticsOrderId
	}
	if req.Cost != nil {
		paramMap["cost"] = *req.Cost
	}
	if req.GoodsInfo != nil {
		paramMap["goods_info"] = *req.GoodsInfo
	}
	if req.StatusCode != nil {
		paramMap["status_code"] = *req.StatusCode
	}
	if req.SubExpressCodes != nil {
		paramMap["sub_express_codes"] = util.ConvertBasicList(*req.SubExpressCodes)
	}
	if req.DeliveryTime != nil {
		paramMap["delivery_time"] = *req.DeliveryTime
	}
	if req.SignTime != nil {
		paramMap["sign_time"] = *req.SignTime
	}
	if req.PickupFinishTime != nil {
		paramMap["pickup_finish_time"] = *req.PickupFinishTime
	}
	if req.PickupDoorTime != nil {
		paramMap["pickup_door_time"] = *req.PickupDoorTime
	}
	if req.NewLogistics != nil {
		paramMap["new_logistics"] = *req.NewLogistics
	}
	if req.ExtendInfo != nil {
		paramMap["extend_info"] = *req.ExtendInfo
	}
	return paramMap
}

func (req *TmallServicecenterWorkcardLogisticsorderUpdateRequest) ToFileMap() map[string]interface{} {
	fileMap := make(map[string]interface{})
	return fileMap
}
